package com.nidu.demo.file.convertor;

import com.nidu.demo.base.BaseConvertor;
import com.nidu.demo.convertor.MapStructConfig;
import com.nidu.demo.file.dto.FileCO;
import com.nidu.demo.file.mapper.dataobject.FileDO;
import com.nidu.demo.file.model.File;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(config = MapStructConfig.class)
public interface FileConvertor extends BaseConvertor<FileDO, File, FileCO> {
    
    @Override
    @Mapping(target = "createTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "createBy", ignore = true)
    @Mapping(target = "updateBy", ignore = true)
    FileDO toDataObject(File file);

}
